package com.Sinewecology.SendMessage;

import java.util.concurrent.ConcurrentLinkedQueue;

public class WillSendMessageList {
	static ConcurrentLinkedQueue<MobileMsgDataBean> MobileMsgList = new ConcurrentLinkedQueue<MobileMsgDataBean>();
	static ConcurrentLinkedQueue<WechatMsgDataBean> WechatMsgList = new ConcurrentLinkedQueue<WechatMsgDataBean>();

//������ֻ���Ϣ�б��в���һ����Ϣ
	public static boolean insertToMobileMsgList(MobileMsgDataBean msg) {
		MobileMsgList.offer(msg);
		return true;
	}

//ȡ�������ֻ���Ϣ���׵Ĵ�����Ϣ��	
	public static MobileMsgDataBean getFromMobileMsgList() {
		if (!MobileMsgList.isEmpty()) {
			MobileMsgDataBean msg = MobileMsgList.poll();
			return msg;
		} else
			return null;
	}

//������ֻ���Ϣ�б��в���һ����Ϣ
	public static boolean insertToWechatMsgList(WechatMsgDataBean msg) {
		WechatMsgList.offer(msg);
		return true;
	}

//ȡ�������ֻ���Ϣ���׵Ĵ�����Ϣ��	
	public static WechatMsgDataBean getFromWechatMsgList() {
		if (!WechatMsgList.isEmpty()) {
			WechatMsgDataBean msg = WechatMsgList.poll();
			return msg;
		} else
			return null;
	}
}
